import { Injectable, OnModuleInit } from '@nestjs/common';
import { DatabaseInitializerService } from './shared/database-initializer.service';

@Injectable()
export class DatabaseInitService implements OnModuleInit {
  constructor(private readonly dbInitializer: DatabaseInitializerService) {}

  async onModuleInit() {
    await this.dbInitializer.ensureDatabaseExists();
  }
}
